Skip to content

feat(cloud-agent): show workspace commits in chat - #5816

Merged
eshurakov merged 2 commits into
mainfrom
eshurakov/boundless-sphinx
Sep 16, 2026
Merged

eshurakov merged 2 commits into
mainfrom
eshurakov/boundless-sphinx

Conversation

@eshurakov

@eshurakov eshurakov commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Show managed workspace commits as subdued transcript entries with hover/tap metadata details.
  • Preserve immutable commit identity, bounded actual messages, turn attribution, replay deduplication, and truthful push status.
  • Keep the existing saved worktree viewer; this feature does not add historical commit diffs.

Verification

No manual browser or live-provider tests were rerun during this restack. Existing feature work was restored from a named stash and integrated with the merged parent; the original local handoff and evidence remain excluded.

Visual Changes

Adds compact commit metadata disclosures in the transcript. No screenshots were captured or uploaded during this restack.

Reviewer Notes

Stacked on main as #5816, with #5817 on top. Four commits after rebase onto latest main. The rebase resolution preserves both upstream sibling-serialization cases and the new commit-identity tests.

Targeted lint and web/SDK/shared/service/wrapper typechecks passed. 926 distinct focused tests passed, including auto-commit/events, SDK projection, commit parsing, isolated web presentation, and six Workers-runtime replay/deletion-fencing tests with mocked external boundaries. Web tests omitted database setup and are not E2E evidence.

The additional standalone services/cloud-agent-next/test/tsconfig.json check is not clean: 711 diagnostics include existing mixed-runtime/mock typing and pending-feature fixture typing. The normal package typechecks pass; no broad test-project cleanup is included.

@eshurakov
eshurakov force-pushed the eshurakov/boundless-sphinx branch from 48cfccf to d1bb6ea Compare September 2, 2026 07:49
@eshurakov
eshurakov force-pushed the eshurakov/boundless-sphinx branch from d1bb6ea to 0d6eac7 Compare September 2, 2026 12:52
@eshurakov
eshurakov force-pushed the eshurakov/boundless-sphinx branch from 0d6eac7 to 75af89c Compare September 3, 2026 07:47
@eshurakov
eshurakov force-pushed the eshurakov/boundless-sphinx branch from 75af89c to ffe3bff Compare September 3, 2026 07:50
@eshurakov
eshurakov force-pushed the eshurakov/boundless-sphinx branch from ffe3bff to 0940760 Compare September 3, 2026 11:37
@eshurakov
eshurakov force-pushed the eshurakov/boundless-sphinx branch from 0940760 to 9235401 Compare September 3, 2026 12:31
@eshurakov
eshurakov force-pushed the eshurakov/boundless-sphinx branch from 9235401 to 7dd0184 Compare September 3, 2026 12:58
@eshurakov
eshurakov force-pushed the eshurakov/boundless-sphinx branch from 7dd0184 to a1d986b Compare September 3, 2026 20:21
@eshurakov
eshurakov force-pushed the eshurakov/boundless-sphinx branch 3 times, most recently from 82b6a08 to 84d0471 Compare September 7, 2026 20:53
@eshurakov
eshurakov force-pushed the eshurakov/boundless-sphinx branch 3 times, most recently from 3967df3 to b1f7a33 Compare September 8, 2026 12:28
@eshurakov
eshurakov force-pushed the eshurakov/boundless-sphinx branch from b1f7a33 to 39353f1 Compare September 8, 2026 12:56
@eshurakov
eshurakov changed the base branch from eshurakov/lucky-crater to eshurakov/warm-ibis September 8, 2026 12:57
@eshurakov
eshurakov force-pushed the eshurakov/boundless-sphinx branch from 39353f1 to 8cf151f Compare September 9, 2026 12:29
@eshurakov
eshurakov force-pushed the eshurakov/boundless-sphinx branch from 8cf151f to 991c8b7 Compare September 9, 2026 13:00
Base automatically changed from eshurakov/warm-ibis to main September 9, 2026 13:34
@eshurakov
eshurakov force-pushed the eshurakov/boundless-sphinx branch 3 times, most recently from 3543e62 to 799233a Compare September 10, 2026 08:34
@eshurakov
eshurakov marked this pull request as ready for review September 10, 2026 09:06
@kilo-code-bot

kilo-code-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The SDK commit deduplication returns before updating commit status, so a replayed autocommit_completed after a replayed autocommit_started can leave the commit indicator permanently stuck on "Committing…".

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/cloud-agent-sdk/src/service-state.ts 595 The duplicate-commit early return also skips the status transition and notify(); a replayed autocommit_started followed by an already-seen autocommit_completed leaves the commit indicator stuck on "Committing…".
Files Reviewed (39 files)
  • apps/web/src/components/cloud-agent-next/CloudAgentWorkspaceTabs.test.ts
  • apps/web/src/components/cloud-agent-next/CloudChatPage.tsx
  • apps/web/src/components/cloud-agent-next/CommitCard.tsx
  • apps/web/src/components/cloud-agent-next/ConversationMessages.test.ts
  • apps/web/src/components/cloud-agent-next/ConversationMessages.tsx
  • apps/web/src/components/cloud-agent-next/WorktreeFilePane.tsx
  • apps/web/src/components/cloud-agent-next/WorktreeFileRenderer.tsx
  • apps/web/src/components/cloud-agent-next/message-presentation.test.ts
  • apps/web/src/components/cloud-agent-next/message-presentation.ts
  • apps/web/src/components/cloud-agent-next/terminal-tabs.test.ts
  • packages/cloud-agent-sdk/src/index.ts
  • packages/cloud-agent-sdk/src/normalizer.ts
  • packages/cloud-agent-sdk/src/schemas.ts
  • packages/cloud-agent-sdk/src/service-state.test.ts
  • packages/cloud-agent-sdk/src/service-state.ts - 1 issue
  • packages/cloud-agent-sdk/src/session-manager.test.ts
  • packages/cloud-agent-sdk/src/session-manager.ts
  • packages/cloud-agent-sdk/src/session.test.ts
  • packages/cloud-agent-sdk/src/types.ts
  • packages/worker-utils/package.json
  • packages/worker-utils/src/cloud-agent-commits.test.ts
  • packages/worker-utils/src/cloud-agent-commits.ts
  • packages/worker-utils/src/index.ts
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/sandbox-session/sandbox-control-event.test.ts
  • services/cloud-agent-next/src/sandbox-session/sandbox-control-event.ts
  • services/cloud-agent-next/src/shared/protocol.ts
  • services/cloud-agent-next/test/integration/sandbox-control.test.ts
  • services/cloud-agent-next/test/unit/wrapper/auto-commit.test.ts
  • services/cloud-agent-next/test/unit/wrapper/batch-lifecycle.test.ts
  • services/cloud-agent-next/wrapper/src/auto-commit.ts
  • services/cloud-agent-next/wrapper/src/commit-objects.test.ts
  • services/cloud-agent-next/wrapper/src/commit-objects.ts
  • services/cloud-agent-next/wrapper/src/control/retained-operation-notifications.test.ts
  • services/cloud-agent-next/wrapper/src/control/retained-operation-notifications.ts
  • services/cloud-agent-next/wrapper/src/control/sandbox-control-handlers.test.ts
  • services/cloud-agent-next/wrapper/src/control/session-operation.test.ts
  • services/cloud-agent-next/wrapper/src/control/session-operation.ts
  • services/cloud-agent-next/wrapper/src/lifecycle.ts

Fix these issues in Kilo Cloud

Previous Review Summaries (5 snapshots, latest commit 535333c)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 535333c)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of 8bb8e9e..535333ca (2 files, 18 changed lines): the post-completion drain now passes userMessageId: state.pendingMessageIds.at(-1) to runAutoCommit, so the emitted record satisfies autoCommitRecordSchema and can persist as a deduplicated commit entry. The added lifecycle regression test drives the real producer and asserts the latest admitted message id. No new defects found in the changed lines.

Files Reviewed (2 files)
  • services/cloud-agent-next/wrapper/src/lifecycle.ts
  • services/cloud-agent-next/test/unit/wrapper/batch-lifecycle.test.ts

Previous review (commit 8bb8e9e)

Status: 2 Issues Found | Recommendation: Address before merge

Executive Summary

The incremental commit reverts the commit-memo comparator to its original form, resolving the hidden-tab finding; the two previously reported issues in commit-objects.ts and WorktreeFileRenderer.tsx remain valid on the current HEAD.

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
services/cloud-agent-next/wrapper/src/commit-objects.ts 75 Unguarded toISOString() on an out-of-range committer timestamp throws and discards both committedAt and commitMessage, so the commit is never persisted as a transcript entry.

SUGGESTION

File Line Issue
apps/web/src/components/cloud-agent-next/WorktreeFileRenderer.tsx 392 Saved-file header no longer signals that the capture is read-only; the PR removed the only in-pane saved/read-only affordance.
Files Reviewed (3 files)
  • apps/web/src/components/cloud-agent-next/ConversationMessages.tsx - 0 issues (prior memo-comparator finding resolved by reverting to !previous.active && !next.active)
  • services/cloud-agent-next/wrapper/src/commit-objects.ts - 1 issue (carried forward, re-verified on current HEAD)
  • apps/web/src/components/cloud-agent-next/WorktreeFileRenderer.tsx - 1 issue (carried forward, re-verified on current HEAD)

Fix these issues in Kilo Cloud

Previous review (commit e65de57)

Status: 3 Issues Found | Recommendation: Address before merge

Executive Summary

The commit-evidence reader can throw on an out-of-range committer timestamp and silently drop a landed commit from the transcript; two lower-severity web regressions (hidden-tab memo skip, removed saved-file read-only cues) round out the findings.

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 2
Issue Details (click to expand)

WARNING

File Line Issue
services/cloud-agent-next/wrapper/src/commit-objects.ts 75 Unguarded toISOString() on an out-of-range committer timestamp throws and discards both committedAt and commitMessage, so the commit is never persisted as a transcript entry.

SUGGESTION

File Line Issue
apps/web/src/components/cloud-agent-next/ConversationMessages.tsx 132 New memo condition compares a map rebuilt on every transcript update, defeating the hidden-tab re-render skip.
apps/web/src/components/cloud-agent-next/WorktreeFileRenderer.tsx 392 Saved-file header no longer signals that the capture is read-only or when it was captured; capturedAt is now dead in the pane.
Files Reviewed (37 files)
  • apps/web/src/components/cloud-agent-next/CloudAgentWorkspaceTabs.test.ts
  • apps/web/src/components/cloud-agent-next/CloudChatPage.tsx
  • apps/web/src/components/cloud-agent-next/CommitCard.tsx
  • apps/web/src/components/cloud-agent-next/ConversationMessages.test.ts
  • apps/web/src/components/cloud-agent-next/ConversationMessages.tsx
  • apps/web/src/components/cloud-agent-next/WorktreeFilePane.tsx
  • apps/web/src/components/cloud-agent-next/WorktreeFileRenderer.tsx
  • apps/web/src/components/cloud-agent-next/message-presentation.test.ts
  • apps/web/src/components/cloud-agent-next/message-presentation.ts
  • apps/web/src/components/cloud-agent-next/terminal-tabs.test.ts
  • packages/cloud-agent-sdk/src/index.ts
  • packages/cloud-agent-sdk/src/normalizer.ts
  • packages/cloud-agent-sdk/src/schemas.ts
  • packages/cloud-agent-sdk/src/service-state.test.ts
  • packages/cloud-agent-sdk/src/service-state.ts
  • packages/cloud-agent-sdk/src/session-manager.test.ts
  • packages/cloud-agent-sdk/src/session-manager.ts
  • packages/cloud-agent-sdk/src/session.test.ts
  • packages/cloud-agent-sdk/src/types.ts
  • packages/worker-utils/package.json
  • packages/worker-utils/src/cloud-agent-commits.test.ts
  • packages/worker-utils/src/cloud-agent-commits.ts
  • packages/worker-utils/src/index.ts
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/sandbox-session/sandbox-control-event.test.ts
  • services/cloud-agent-next/src/sandbox-session/sandbox-control-event.ts
  • services/cloud-agent-next/src/shared/protocol.ts
  • services/cloud-agent-next/test/integration/sandbox-control.test.ts
  • services/cloud-agent-next/test/unit/wrapper/auto-commit.test.ts
  • services/cloud-agent-next/wrapper/src/auto-commit.ts
  • services/cloud-agent-next/wrapper/src/commit-objects.test.ts
  • services/cloud-agent-next/wrapper/src/commit-objects.ts
  • services/cloud-agent-next/wrapper/src/control/retained-operation-notifications.test.ts
  • services/cloud-agent-next/wrapper/src/control/retained-operation-notifications.ts
  • services/cloud-agent-next/wrapper/src/control/sandbox-control-handlers.test.ts
  • services/cloud-agent-next/wrapper/src/control/session-operation.test.ts
  • services/cloud-agent-next/wrapper/src/control/session-operation.ts

Fix these issues in Kilo Cloud

Previous review (commit 576895d)

Status: No Issues Found | Recommendation: Merge

Reviewed the PR against the current head 576895d2ee337221e0b2f55de93d87a45a9eadc8 on main (2eadf4f). The branch was rebased/restacked, so the prior incremental base no longer exists; a full review of the current PR diff was performed instead. No new high-confidence defects were found in the changed lines.

Files Reviewed (37 files)
  • apps/web/src/components/cloud-agent-next/CloudAgentWorkspaceTabs.test.ts
  • apps/web/src/components/cloud-agent-next/CloudChatPage.tsx
  • apps/web/src/components/cloud-agent-next/CommitCard.tsx
  • apps/web/src/components/cloud-agent-next/ConversationMessages.test.ts
  • apps/web/src/components/cloud-agent-next/ConversationMessages.tsx
  • apps/web/src/components/cloud-agent-next/WorktreeFilePane.tsx
  • apps/web/src/components/cloud-agent-next/WorktreeFileRenderer.tsx
  • apps/web/src/components/cloud-agent-next/message-presentation.test.ts
  • apps/web/src/components/cloud-agent-next/message-presentation.ts
  • apps/web/src/components/cloud-agent-next/terminal-tabs.test.ts
  • packages/cloud-agent-sdk/src/index.ts
  • packages/cloud-agent-sdk/src/normalizer.ts
  • packages/cloud-agent-sdk/src/schemas.ts
  • packages/cloud-agent-sdk/src/service-state.test.ts
  • packages/cloud-agent-sdk/src/service-state.ts
  • packages/cloud-agent-sdk/src/session-manager.test.ts
  • packages/cloud-agent-sdk/src/session-manager.ts
  • packages/cloud-agent-sdk/src/session.test.ts
  • packages/cloud-agent-sdk/src/types.ts
  • packages/worker-utils/package.json
  • packages/worker-utils/src/cloud-agent-commits.test.ts
  • packages/worker-utils/src/cloud-agent-commits.ts
  • packages/worker-utils/src/index.ts
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/sandbox-session/sandbox-control-event.test.ts
  • services/cloud-agent-next/src/sandbox-session/sandbox-control-event.ts
  • services/cloud-agent-next/src/shared/protocol.ts
  • services/cloud-agent-next/test/integration/sandbox-control.test.ts
  • services/cloud-agent-next/test/unit/wrapper/auto-commit.test.ts
  • services/cloud-agent-next/wrapper/src/auto-commit.ts
  • services/cloud-agent-next/wrapper/src/commit-objects.test.ts
  • services/cloud-agent-next/wrapper/src/commit-objects.ts
  • services/cloud-agent-next/wrapper/src/control/retained-operation-notifications.test.ts
  • services/cloud-agent-next/wrapper/src/control/retained-operation-notifications.ts
  • services/cloud-agent-next/wrapper/src/control/sandbox-control-handlers.test.ts
  • services/cloud-agent-next/wrapper/src/control/session-operation.test.ts
  • services/cloud-agent-next/wrapper/src/control/session-operation.ts

Previous review (commit 799233a)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (38 files)
  • apps/web/src/components/cloud-agent-next/CloudAgentWorkspaceTabs.test.ts
  • apps/web/src/components/cloud-agent-next/CloudChatPage.tsx
  • apps/web/src/components/cloud-agent-next/CommitCard.tsx
  • apps/web/src/components/cloud-agent-next/ConversationMessages.test.ts
  • apps/web/src/components/cloud-agent-next/ConversationMessages.tsx
  • apps/web/src/components/cloud-agent-next/WorktreeFilePane.tsx
  • apps/web/src/components/cloud-agent-next/WorktreeFileRenderer.tsx
  • apps/web/src/components/cloud-agent-next/message-presentation.test.ts
  • apps/web/src/components/cloud-agent-next/message-presentation.ts
  • apps/web/src/components/cloud-agent-next/terminal-tabs.test.ts
  • packages/cloud-agent-sdk/src/index.ts
  • packages/cloud-agent-sdk/src/normalizer.ts
  • packages/cloud-agent-sdk/src/schemas.ts
  • packages/cloud-agent-sdk/src/service-state.test.ts
  • packages/cloud-agent-sdk/src/service-state.ts
  • packages/cloud-agent-sdk/src/session-manager.test.ts
  • packages/cloud-agent-sdk/src/session-manager.ts
  • packages/cloud-agent-sdk/src/session.test.ts
  • packages/cloud-agent-sdk/src/types.ts
  • packages/worker-utils/package.json
  • packages/worker-utils/src/cloud-agent-commits.test.ts
  • packages/worker-utils/src/cloud-agent-commits.ts
  • packages/worker-utils/src/index.ts
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/sandbox-session/sandbox-control-event.test.ts
  • services/cloud-agent-next/src/sandbox-session/sandbox-control-event.ts
  • services/cloud-agent-next/src/shared/protocol.ts
  • services/cloud-agent-next/test/e2e/sandbox-control.ts
  • services/cloud-agent-next/test/integration/sandbox-control.test.ts
  • services/cloud-agent-next/test/unit/wrapper/auto-commit.test.ts
  • services/cloud-agent-next/wrapper/src/auto-commit.ts
  • services/cloud-agent-next/wrapper/src/commit-objects.test.ts
  • services/cloud-agent-next/wrapper/src/commit-objects.ts
  • services/cloud-agent-next/wrapper/src/control/retained-operation-notifications.test.ts
  • services/cloud-agent-next/wrapper/src/control/retained-operation-notifications.ts
  • services/cloud-agent-next/wrapper/src/control/sandbox-control-handlers.test.ts
  • services/cloud-agent-next/wrapper/src/control/session-operation.test.ts
  • services/cloud-agent-next/wrapper/src/control/session-operation.ts

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@eshurakov
eshurakov force-pushed the eshurakov/boundless-sphinx branch 2 times, most recently from 576895d to e65de57 Compare September 15, 2026 11:09
Comment thread services/cloud-agent-next/wrapper/src/commit-objects.ts
Comment thread apps/web/src/components/cloud-agent-next/ConversationMessages.tsx Outdated
Comment thread apps/web/src/components/cloud-agent-next/WorktreeFileRenderer.tsx
@eshurakov
eshurakov force-pushed the eshurakov/boundless-sphinx branch from e65de57 to 8bb8e9e Compare September 15, 2026 11:37

@pandemicsyn pandemicsyn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just one small one from the robot

Comment thread services/cloud-agent-next/wrapper/src/auto-commit.ts
- Show managed workspace commits as subdued transcript entries with hover/tap metadata details.
- Preserve immutable commit identity, bounded actual messages, turn attribution, replay deduplication, and truthful push status.
- Keep the existing saved worktree viewer; this feature does not add historical commit diffs.

Restacked onto latest main and squashed to one commit.
@eshurakov
eshurakov force-pushed the eshurakov/boundless-sphinx branch from 535333c to 1e23c4d Compare September 16, 2026 08:35
@eshurakov
eshurakov merged commit 38a07ea into main Sep 16, 2026
54 checks passed
@eshurakov
eshurakov deleted the eshurakov/boundless-sphinx branch September 16, 2026 09:07
const parsedCommit = sessionCommitDataSchema.safeParse(event);
const commitHash = parsedCommit.success ? parsedCommit.data.commitHash : undefined;
if (parsedCommit.success) {
if (seenCommits.has(parsedCommit.data.commitHash)) return;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: The dedup early return also skips the status transition and notify().

seenCommits.has(...) correctly guards the commit record, but returning here jumps over the status block and notify() that follow. Service events are replayed on connect/reconnect (cloud-agent-transport.ts seeds fromId=0 so the Durable Object re-delivers the stored log), and autocommit_started / autocommit_completed are persisted with a plain insert (no entity-id dedup) in websocket/ingest.ts, so a replayed started can arrive after a completed that was already recorded. processAutocommitStarted (service-state.ts:577) resets status to { type: 'autocommit', step: 'started' }, and the replayed completed then returns here before restoring step: 'completed', leaving the commit indicator stuck on "Committing…" until some later event overwrites it. Restrict the dedup guard to the commits append so the status/notify() path still runs for repeat completions.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants